package com.lhy.admin.common.mybatis.handlers;

import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.lhy.admin.common.mvcplus.java8time.Java8TimeObjectMapperFactory;

/**
 * Java8TimeJacksonTypeHandler 支持java8时间转换
 *
 * @author hyluan
 * @date 2023年02月20日 10:16
 */
public class Java8TimeJacksonTypeHandler extends JacksonTypeHandler {
    public Java8TimeJacksonTypeHandler(Class<?> type) {
        super(type);
        ObjectMapper objectMapper = Java8TimeObjectMapperFactory.newObjectMapper();
        setObjectMapper(objectMapper);
    }


}
